//
//  NSString+BCString.m
//  BangcaiBuy
//
//  Created by Liang Zhang on 16/7/5.
//  Copyright © 2016年 BCB. All rights reserved.
//

#import "NSString+BCString.h"

@implementation NSString (BCString)

-(instancetype)rmbString {//￥123.00
    NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
    formatter.numberStyle = kCFNumberFormatterRoundDown;
    return [formatter stringFromNumber:@(self.integerValue)];
}

-(instancetype)financeString {//123,456,789
    NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
    formatter.numberStyle = NSNumberFormatterDecimalStyle;
    return [formatter stringFromNumber:@(self.integerValue)];
}

@end
